<?php
    $kemu = session('kemu'); $ck_vip = ck_vip_exprire();
?>

<?php if( !$ck_vip ): ?>
    <div class="alert alert-danger no-border" style="padding: 5px; 15px;">
        <span class="text-semibold">提醒:</span> 请登录开通VIP查看专业录取概率!
    </div>
<?php endif;?>

<div class="panel panel-flat">
    <table class="table datatable-selection-single table-hover">
        <thead>
        <tr>
            <th width="60">序号</th>
            <th width="100px">录取概率</th>
            <th width="145px">专业名称</th>
            <th width="110px">最低分</th>
            <th width="100px">招生人数</th>
            <th width="100px" class="text-right">最低/我的位次</th>
        </tr>
        </thead>
        <tbody>
        <?php if( $data['odds_data'] && $ck_vip) :?>
            <?php foreach ($data['odds_data'] as $k=>$v):?>
                <?php $v = (array) $v?>
                <?php preg_match("/^[^（]+/", $v['spname'], $matches);?>
                <tr>
                    <td><?=($k+1)?></td>
                    <td><?=$v['odds']?"{$v['odds']}%":'-'?></td>
                    <td><?=$v['spname2']?:$matches[0]?></td>
                    <td><?=$v['min']?></td>
                    <td><?=$v['num']?></td>
                    <td class="text-right"><?=$v['section']?> / <?=$kemu['section']?></td>
                </tr>
            <?php endforeach;?>
        <?php else: ?>
            <tr><td colspan="6" class="text-center">暂无数据</td></tr>
        <?php endif;?>
        </tbody>
    </table>
</div>